/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-07-19 14:42:56
 * @LastEditors: 武兴创 superjava@vip.qq.com
 * @LastEditTime: 2024-08-28 17:42:12
 * @FilePath: \SGFEM\DataStructure\FEM\Load\include\GRAVData.h
 * @Description: 重力加速度
 * GRAV
 */

#pragma once
#include <map>

#include "Utility/Algebra/Vector3D.h"

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Common/SetBase.h"
#include "DataStructure/Input/Load/LoadTypes.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct GRAVData : public SetBase
{
    SG::DataStructure::Common::Id   m_cId      = 0;        ///< 载荷定义坐标系， 默认0
    SG::DataStructure::Common::Real m_a        = 0.0;      ///< 加速度系数
    SG::DataStructure::Common::Real m_N[3]     = { 0.0 };  ///< 载荷方向
    SG::DataStructure::Common::I64  m_MB       = 0;        ///< 坐标系定义在主数据段还是其他
    SG::DataStructure::Common::Id   m_domainId = 0;
    static SG::DataStructure::FEM::LoadType GetType ()
    {
        return SG::DataStructure::FEM::LoadType::LOAD_Gravity;
    };
};

/** @brief 重力载荷集别名 */
using GrivitySet = std::map<SG::DataStructure::Common::Id, GRAVData>;

DECLSPEC bool operator== (const GRAVData& lhs, const GRAVData& rhs);

DECLSPEC bool operator< (const GRAVData& SGDataA, const GRAVData& SGDataB);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE